package thread;

public class Priority {
    public static void main(String[] args) {
        Thread min = new Thread(){
            @Override
            public void run() {
                for (int i=0; i<100000;i++){
                    System.out.println("min");
                }
            }
        };
        Thread nom = new Thread(){
            @Override
            public void run() {
                for (int i=0; i<100000;i++){
                    System.out.println("nom");
                }
            }
        };
        Thread max = new Thread(){
            @Override
            public void run() {
                for (int i=0; i<100000;i++){
                    System.out.println("max");
                }
            }
        };
        min.setPriority(Thread.MAX_PRIORITY);
        max.setPriority(Thread.MIN_PRIORITY);
        max.start();
        min.start();
        nom.start();
    }
}
